{extend name="default/base" /}
{block name="css"}
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
{/block}
{block name="main"}
  <div class='wst-grid'>
  <input type='hidden' id='complainId' class='ipt' value="{$data['complainId']}"/>
  <form id="respondForm" method="post">
    <table width='100%'>
      <td width='250' valign="top">
         <table style='border:1px solid #ddd'>
          <tr>
            <td class='wst-complain-order-head'>订单商品</td>
          </tr>
          <tr>
            <td class='wst-complain-order-goods' valign="top">
              {volist name="$data['goodsList']" id="goods" key='key2'}
                <a target='_blank' href="{:Url('home/goods/detail',array('goodsId'=>$goods['goodsId']))}" title="{$goods['goodsName']}">
                <img data-original="__RESOURCE_PATH__/{$goods['goodsImg']}" height="55" width="55" class='gImg'/>
                </a>
               {/volist}
            </td>
          </tr>
          <tr>
            <td class='wst-complain-order-head'>订单信息</td>
          </tr>
          <tr>
            <td>
              <div class='wst-complain-order-info'>
                 <dl>
                     <dt>订单编号：</dt>
                     <dd>{$data['orderNo']}</dd>
                     <dt>订单金额：</dt>
                     <dd>￥{$data['realTotalMoney']}</dd>
                     <dt>运&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;费：</dt>
                     <dd>￥{$data['deliverMoney']}</dd>
                     <dt>下单时间：</dt>
                     <dd>{$data['createTime']}</dd>
                     <dt>商&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;家：</dt>
                     <dd>{$data['shopName']}</dd>
                  </dl>
                </div>
            </td>
          </tr>
        </table>
      </td>
      <td style='padding-right:5px;'>
          <table class='wst-complain-main'>
             <tr>
                <td class='wst-complain-order-head' colspan="2">投诉信息</td>
             </tr>
             <tr>
                <td width='70' height='25' align='right'>投诉类型：</td>
                <td>
                    {php}$reason = WSTDatas('ORDER_COMPLAINT',$data['complainType']);{/php}
                    {$reason['dataName']}
                </td>
             </tr>
             <tr>
                <td align='right' height='25'>详情：</td>
                <td class='line-break'>{$data['complainContent']}</td>
             </tr>
             <tr>
                <td align='right' height='25'>附件：</td>
                <td>
                   <div id="photos-complain">
                   {if !empty($data['complainAnnex'])}
                   {volist name="$data['complainAnnex']" id="annex"}
                    <img class='lazyImg' layer-src="__RESOURCE_PATH__/{$annex}" data-original="__RESOURCE_PATH__/{$annex}" style='cursor: pointer;' src="__RESOURCE_PATH__/{:str_replace('.','_thumb.',$annex)}" height="100" width="100"/>
                   {/volist}
                   {/if}
                    </div>
                   </td>
              </tr>
              <tr>
                  <td class='wst-complain-order-head' colspan="2">应诉信息</td>
              </tr>
              <tr>
                <td colspan="2" style='padding:5px;'>
                   <textarea id='respondContent' name="respondContent" class='ipt' autocomplete="off" style='width:100%;height:162px;' placeholder='请输入应诉内容' data-rule='应诉内容:required;' data-target='#msg_respondContent'></textarea><br/>
                   <div class='msg-box' id='msg_respondContent'></div>
                </td>
              </tr>
              <tr>
                   <td colspan="2" style='padding:5px;'>
                       <div id="filePicker" >上传附件(最多5张)</div>
                   </td>
              </tr>
              <tr id='annex' style='display:none'>
                   <td colspan="2">
                       <div id='picBox' style='height:120px;width:710px;padding:5px;'>
                   </td>
              </tr>
              <tr>
                   <td align="center" colspan="2" style='padding-bottom:15px;'>
                      <button type="button" class="btn btn-primary btn-mright" onclick="javascript:saveRespond({$p})"><i class="fa fa-check"></i>提&nbsp;交</button>
                      <button type="button" class="btn" onclick="toBack({$p})"><i class="fa fa-angle-double-left"></i>返&nbsp;回</button>
                   </td>
              </tr>
            </table>
      </td>
    </table>
     </form>
  </div>
{/block}
{block name="js"}
<script type='text/javascript' src='__ROOT__/static/plugins/lazyload/jquery.lazyload.min.js?v={$v}'></script>
<script type='text/javascript' src='__SHOP__/orders/orders.js?v={$v}'></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
<script>
$(function(){
  respondInit();
})
</script>
{/block}
